cmake_minimum_required (VERSION 2.6)
add_executable (test
    ../gtest/src/gtest-all.cc
    cooperative-condition-test.cpp
    cooperative-event-test.cpp
    cooperative-file-test.cpp
    cooperative-mutex-test.cpp
    cooperative-rwlock-test.cpp
    cooperative-semaphore-test.cpp
    fiber-env-test.cpp
    main.cpp
    )
set (CMAKE_CXX_FLAGS "-std=c++0x -g")
include_directories (
    ../fiber-env
    ../gtest
    ../gtest/include
    )
target_link_libraries (test
    fcgisvr
    common
    fiberenv
    pthread
    )
add_custom_target (check ./test
    DEPENDS test
    )
add_custom_target (valgrind valgrind --tool=memcheck --leak-check=yes --log-file=./valgrind.log ./test
    DEPENDS test
    )
